import { getSwiperImage, getNavInfo, getFloorInfo } from '../../request/home'

Page({
  data: {
    swiperList: [],
    homeNav: [],
    floorInfo: [],
  },

  onLoad: function (options) {
    this.getSwiperImage()
    this.getNavInfo()
    this.getFloorInfo()
  },

  async getSwiperImage() {
    let swiperList = await getSwiperImage()
    this.setData({
      swiperList
    })
  },

  async getNavInfo() {
    let homeNav = await getNavInfo()
    this.setData({
      homeNav
    })
  },

  async getFloorInfo() {
    let floorInfo = await getFloorInfo()
    this.setData({
      floorInfo
    })
  }
})
